
import { createApp } from "vue";
let log = (data) => {
    console.log("你终于点log了")
}
import {ElButton} from "element-plus"
const MessageBox = {
    props:{
        msg:{
            type:String,
            required:true
        },
        close:{
            type:Function,
            required:true
        }
    },
    render(ctx){
        const {$props,$emit} = ctx;
        console.log("zptest:",{$props,$emit})
        return <div>
            --{$props}--
            <ElButton onclick={()=>{$props.close()}}>这里是按钮</ElButton>
        </div>
    }
}

import one from './one.vue';

function ShowComponent(){
    // 挂载到div 下面
    const div = document.createElement("div");
    document.body.appendChild(div);
    let app = createApp(
        // MessageBox,
        one,
        {
        msg:"测试",
        close(){
            // app.unmount(div);
            div.remove()
        },
        onclick(){
            console.log("见鬼")
        }
    })
    app.mount(document.querySelector(div))
    // const app = 
}

export {ShowComponent}